package com.lxl.service.impl;

import java.util.List;

import com.lxl.dao.BookUserDao;
import com.lxl.dao.impl.BookUserDaoImpl;
import com.lxl.model.BookUser;
import com.lxl.service.BookUserService;

/**
 * @author 刘星鹭
 * @Email liuxinglumail@163.com
 * @version 创建时间： 2014年9月12日 上午10:45:06
 */

public class BookUserServiceImpl implements BookUserService {

	@Override
	public void persist(BookUser bookUser) { // 以下为CRUD方法

		BookUserDao bookUserDao = new BookUserDaoImpl();
		bookUserDao.persist(bookUser);

	}

	@Override
	public void delete(Integer bookUserId) {

		BookUserDao bookUserDao = new BookUserDaoImpl();
		bookUserDao.delete(bookUserId);

	}

	@Override
	public void merge(Integer oldUserId, BookUser newUser) {

		BookUserDao bookUserDao = new BookUserDaoImpl();
		bookUserDao.merge(oldUserId, newUser);

	}

	@Override
	public BookUser get(Integer bookUserId) {
		BookUserDao bookUserDao = new BookUserDaoImpl();
		return bookUserDao.get(bookUserId);
	}

	@Override
	public List<BookUser> list() {
		BookUserDao bookUserDao = new BookUserDaoImpl();
		return bookUserDao.list();
	}
}
